//这是父类
class Person{
    constructor(name, age){
        this.name = name
        this.age = age
    }
    say(){
        console.log("你好")
    }
}

class American extends Person{
   constructor(name,age){
       super(name,age)
   }
}

const a1 = new American('Jack',20)
console.log(a1)
a1.say()
class Chinese extends Person{
    constructor(name,age, IdNum){
        super(name,age)
        this.IdNum = IdNum
    }
}

const c1 = new Chinese('张三',22,'372330199703230015')
console.log(c1)
c1.say()